<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0, user-scalable=0">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>添加银行卡</title>

    <!-- Bootstrap -->
    <link href="bootstrap-3.3.5-dist/css/bootstrap.css" rel="stylesheet">
    <link href="bootstrap-3.3.5-dist/css/add_card.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <div class="container">
      <div class="row">
        <div class="col-md-12 registered_nav">
          <ul>
            <li class="on">1输入银行卡号</li><span>></span>
            <li>2输入验证码</li><span>></span>
            <li>3设置交易密码</li>
          </ul>
        </div>
        <div class="col-md-12 card_info">
            <form>
              <div class="container card">
                <div class="row">
                   <div class="col-md-12 card_name">
                      持卡人
                      <span>王老五</span>
                   </div>
                   <div class="col-md-12 card_name">
                      银&nbsp;&nbsp;&nbsp;行
                      <div class="choose_bank">
                        <span class="bank">请选择你要充值的银行</span>
                      </div>
                   </div>
                   <div class="col-md-12 card_name gold">
                      卡&nbsp;&nbsp;&nbsp;号
                      <input type="number" placeholder="请输入银行卡号" class="password1" oninput="button_change (event)"  id="mobile">
                   </div>
                   <button type="submit" disabled="disabled" class="sure button_1">下一步</button>
                </div>
              </div>
            </form>
        </div>
      </div>
    </div>
    <!--背景灰色图层-->
    <div class="bgc"></div>
    <!--选择银行卡-->
    <div class="container choose_card">
      <div class="row" style="background-color: #fff;">
        <div class="col-md-12">
          <div class="choose_bank_title">
            <img src="images/close.png">
            <span class="choose_bank_title">请选择银行</span>
          </div>
        </div>
        <div class="col-md-12 card_list">
            <img src="images/gongshang.png">
            工商银行
        </div>
        <div class="col-md-12 card_list">
            <img src="images/nongye.png">
            农业银行
        </div>
        <div class="col-md-12 card_list">
            <img src="images/zhaoshang.png">
            招商银行
        </div> 
        <div class="col-md-12 card_list">
            <img src="images/jianshe.png">
            建设银行
        </div>  
      </div>
    </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery-1.11.3.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
    <script type="text/javascript">
        $(function() {
            $('button').attr("disabled", true); 
            $(".bgc").css("height",$(document).height()); 
            // var password1 = $('.password1').val();            
        });
        /*全部选项都填好了button才可以点击*/
        function button_change (event) {
            var password1 = $('.password1').val(); 
            if(password1=="")
            {
              $('button').attr("disabled", "disabled");
              $("button").css("background-color","#bfbfbf");
            }else{
              $('button').attr("disabled", false);
              $("button").css("background-color","#f5a002");
            }
        }
        //jquery验证手机号码 
        function checkSubmitMobil() { 
        if (!$("#mobile").val().match(/^(((13[0-9]{1})|159|153)+\d{8})$/)) { 
          alert("手机号码格式不正确！"); 
        } 
        else{
          location.href='index.html';
        }
        return true; 
        } 
        /*选择银行卡 显示*/
        $(".choose_bank").click(function(){
          $(".bgc").css("display","block");
          $(".choose_card").css("display","block");
        });
        /*选择银行卡 取消*/
        $(".choose_bank_title>img").click(function(){
          $(".bgc").css("display","none");
          $(".choose_card").css("display","none");
        });
        /*银行信息赋值*/
        $(".card_list").click(function(){
          var bank_name = $(this).text();
          $(".choose_bank>span").text(bank_name);
          $(".bgc").css("display","none");
          $(".choose_card").css("display","none");
          $(".bank").css("color","#000");
        });
    </script>
  </body>
</html>